Integrand size = 26, antiderivative size = 85 \[ \int \frac {(c-c \sec (e+f x))^3}{(a+a \sec (e+f x))^2} \, dx=\frac {c^3 x}{a^2}-\frac {c^3 \text {arctanh}(\sin (e+f x))}{a^2 f}-\frac {8 c^3 \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))^2}+\frac {4 c^3 \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))} \]
[Out]
Time = 0.44 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.346, Rules used = {3988, 3862, 4004, 3879, 3881, 3882, 3884, 4083, 3855} \[ \int \frac {(c-c \sec (e+f x))^3}{(a+a \sec (e+f x))^2} \, dx=-\frac {c^3 \text {arctanh}(\sin (e+f x))}{a^2 f}+\frac {4 c^3 \tan (e+f x)}{3 a^2 f (\sec (e+f x)+1)}-\frac {8 c^3 \tan (e+f x)}{3 a^2 f (\sec (e+f x)+1)^2}+\frac {c^3 x}{a^2} \]
[In]
[Out]
Rule 3855
Rule 3862
Rule 3879
Rule 3881
Rule 3882
Rule 3884
Rule 3988
Rule 4004
Rule 4083
Rubi steps \begin{align*} \text {integral}& = \frac {\int \left (\frac {c^3}{(1+\sec (e+f x))^2}-\frac {3 c^3 \sec (e+f x)}{(1+\sec (e+f x))^2}+\frac {3 c^3 \sec ^2(e+f x)}{(1+\sec (e+f x))^2}-\frac {c^3 \sec ^3(e+f x)}{(1+\sec (e+f x))^2}\right ) \, dx}{a^2} \\ & = \frac {c^3 \int \frac {1}{(1+\sec (e+f x))^2} \, dx}{a^2}-\frac {c^3 \int \frac {\sec ^3(e+f x)}{(1+\sec (e+f x))^2} \, dx}{a^2}-\frac {\left (3 c^3\right ) \int \frac {\sec (e+f x)}{(1+\sec (e+f x))^2} \, dx}{a^2}+\frac {\left (3 c^3\right ) \int \frac {\sec ^2(e+f x)}{(1+\sec (e+f x))^2} \, dx}{a^2} \\ & = -\frac {8 c^3 \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))^2}-\frac {c^3 \int \frac {-3+\sec (e+f x)}{1+\sec (e+f x)} \, dx}{3 a^2}-\frac {c^3 \int \frac {\sec (e+f x) (-2+3 \sec (e+f x))}{1+\sec (e+f x)} \, dx}{3 a^2}-\frac {c^3 \int \frac {\sec (e+f x)}{1+\sec (e+f x)} \, dx}{a^2}+\frac {\left (2 c^3\right ) \int \frac {\sec (e+f x)}{1+\sec (e+f x)} \, dx}{a^2} \\ & = \frac {c^3 x}{a^2}-\frac {8 c^3 \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))^2}+\frac {c^3 \tan (e+f x)}{a^2 f (1+\sec (e+f x))}-\frac {c^3 \int \sec (e+f x) \, dx}{a^2}-\frac {\left (4 c^3\right ) \int \frac {\sec (e+f x)}{1+\sec (e+f x)} \, dx}{3 a^2}+\frac {\left (5 c^3\right ) \int \frac {\sec (e+f x)}{1+\sec (e+f x)} \, dx}{3 a^2} \\ & = \frac {c^3 x}{a^2}-\frac {c^3 \text {arctanh}(\sin (e+f x))}{a^2 f}-\frac {8 c^3 \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))^2}+\frac {4 c^3 \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 1.37 (sec) , antiderivative size = 189, normalized size of antiderivative = 2.22 \[ \int \frac {(c-c \sec (e+f x))^3}{(a+a \sec (e+f x))^2} \, dx=\frac {c^{5/2} \tan (e+f x) \left (4 \sqrt {2} \sqrt {a} \sqrt {c} \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},-\frac {3}{2},-\frac {1}{2},\frac {1}{2} (1+\sec (e+f x))\right ) \sqrt {1-\sec (e+f x)}-4 \sqrt {a} \sqrt {c} \left (-2+\sec (e+f x)+\sec ^2(e+f x)\right )-6 \text {arctanh}\left (\frac {\sqrt {-a c \tan ^2(e+f x)}}{\sqrt {a} \sqrt {c}}\right ) \cos ^2\left (\frac {1}{2} (e+f x)\right ) \sec (e+f x) \sqrt {-a c \tan ^2(e+f x)}\right )}{3 a^{5/2} f (-1+\sec (e+f x)) (1+\sec (e+f x))^2} \]
[In]
[Out]
Time = 0.66 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.68
method | result | size |
parallelrisch | \(\frac {c^{3} \left (4 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}+3 f x +3 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )-3 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )\right )}{3 a^{2} f}\) | \(58\) |
derivativedivides | \(\frac {4 c^{3} \left (\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}+\frac {\arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}-\frac {\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{4}+\frac {\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{4}\right )}{f \,a^{2}}\) | \(66\) |
default | \(\frac {4 c^{3} \left (\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3}+\frac {\arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}-\frac {\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{4}+\frac {\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{4}\right )}{f \,a^{2}}\) | \(66\) |
risch | \(\frac {c^{3} x}{a^{2}}-\frac {8 i c^{3} \left (3 \,{\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{3 f \,a^{2} \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{3}}+\frac {c^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{a^{2} f}-\frac {c^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{a^{2} f}\) | \(95\) |
norman | \(\frac {\frac {c^{3} x}{a}+\frac {c^{3} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{a}+\frac {4 c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3 a f}-\frac {8 c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{3 a f}+\frac {4 c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{3 a f}-\frac {2 c^{3} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{a}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{2} a}+\frac {c^{3} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{a^{2} f}-\frac {c^{3} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{a^{2} f}\) | \(180\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 173 vs. \(2 (81) = 162\).
Time = 0.28 (sec) , antiderivative size = 173, normalized size of antiderivative = 2.04 \[ \int \frac {(c-c \sec (e+f x))^3}{(a+a \sec (e+f x))^2} \, dx=\frac {6 \, c^{3} f x \cos \left (f x + e\right )^{2} + 12 \, c^{3} f x \cos \left (f x + e\right ) + 6 \, c^{3} f x - 3 \, {\left (c^{3} \cos \left (f x + e\right )^{2} + 2 \, c^{3} \cos \left (f x + e\right ) + c^{3}\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) + 3 \, {\left (c^{3} \cos \left (f x + e\right )^{2} + 2 \, c^{3} \cos \left (f x + e\right ) + c^{3}\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) - 8 \, {\left (c^{3} \cos \left (f x + e\right ) - c^{3}\right )} \sin \left (f x + e\right )}{6 \, {\left (a^{2} f \cos \left (f x + e\right )^{2} + 2 \, a^{2} f \cos \left (f x + e\right ) + a^{2} f\right )}} \]
[In]
[Out]
\[ \int \frac {(c-c \sec (e+f x))^3}{(a+a \sec (e+f x))^2} \, dx=- \frac {c^{3} \left (\int \frac {3 \sec {\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx + \int \left (- \frac {3 \sec ^{2}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\right )\, dx + \int \frac {\sec ^{3}{\left (e + f x \right )}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx + \int \left (- \frac {1}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\right )\, dx\right )}{a^{2}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 268 vs. \(2 (81) = 162\).
Time = 0.29 (sec) , antiderivative size = 268, normalized size of antiderivative = 3.15 \[ \int \frac {(c-c \sec (e+f x))^3}{(a+a \sec (e+f x))^2} \, dx=\frac {c^{3} {\left (\frac {\frac {9 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}}{a^{2}} - \frac {6 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a^{2}} + \frac {6 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a^{2}}\right )} - c^{3} {\left (\frac {\frac {9 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}}{a^{2}} - \frac {12 \, \arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a^{2}}\right )} + \frac {3 \, c^{3} {\left (\frac {3 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{a^{2}} - \frac {3 \, c^{3} {\left (\frac {3 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {\sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{a^{2}}}{6 \, f} \]
[In]
[Out]
none
Time = 0.33 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.94 \[ \int \frac {(c-c \sec (e+f x))^3}{(a+a \sec (e+f x))^2} \, dx=\frac {\frac {4 \, c^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3}}{a^{2}} + \frac {3 \, {\left (f x + e\right )} c^{3}}{a^{2}} - \frac {3 \, c^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right )}{a^{2}} + \frac {3 \, c^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right )}{a^{2}}}{3 \, f} \]
[In]
[Out]
Time = 13.22 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.54 \[ \int \frac {(c-c \sec (e+f x))^3}{(a+a \sec (e+f x))^2} \, dx=\frac {c^3\,x}{a^2}-\frac {c^3\,\left (2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )-\frac {4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{3}\right )}{a^2\,f} \]
[In]
[Out]